﻿using System.Collections.Generic;
using TestesFixacao.WindowsApp.Refatorado.Controls.DisciplinaForms;
using TestesFixacao.WindowsApp.Refatorado.Controls.MateriaForms;
using TestesFixacao.WindowsApp.Refatorado.Controls.QuestaoForms;
using TestesFixacao.WindowsApp.Refatorado.Controls.SerieForms;
using TestesFixacao.WindowsApp.Refatorado.Controls.TesteForms;

namespace TestesFixacao.WindowsApp.Refatorado.Controls.Shared
{
    public class DataManagerFactory
    {
        private static readonly Dictionary<DataManagerEnum, IDataManager> managers =
            new Dictionary<DataManagerEnum, IDataManager>();

        static DataManagerFactory()
        {
            managers[DataManagerEnum.Disciplinas] = new DisciplinaDataManagerImpl();
            managers[DataManagerEnum.Materias] = new MateriaDataManagerImpl();
            managers[DataManagerEnum.Serie] = new SerieDataManagerImpl();
            managers[DataManagerEnum.Questoes] = new QuestaoDataManagerImpl();
            managers[DataManagerEnum.Teste] = new TesteDataManagerImpl();
        }

        public static IDataManager GetManager(DataManagerEnum key)
        {
            return managers[key];
        }
    }
}